package com.twu.biblioteca;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class BibliotecaApp extends Biblioteca{

    public static void main(String[] args) throws IOException {
        Biblioteca biblioteca = new Biblioteca();
        Books books = new Books();
        books.add(new Book("First Book"));
        books.add(new Book("Second Book"));
        biblioteca.setBooks(books);

        appSays(biblioteca.welcomeMessage());
        appSays(biblioteca.getBooks().showBooks());
        appSays(biblioteca.mainMenu());
        appSays(biblioteca.choose(getInputLine()));

    }

    private static String getInputLine() throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        return br.readLine();
    }

    public static void appSays(String say) {
        System.out.println(say);
        System.out.println();
    }

}
